﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Marmat.Foundation
{
    /// <summary>
    /// 通知服务总线
    /// </summary>
   public interface INotificationBus
    {
        /// <summary>
        /// 订阅
        /// </summary>
        /// <param name="channel"></param>
        /// <param name="notification"></param>
        void Subscription(string channel, INotification notification);

        /// <summary>
        /// 退订
        /// </summary>
        /// <param name="notification"></param>
        void Unsubscribe(INotification notification);

        /// <summary>
        /// 发布通知
        /// </summary>
        /// <param name="channel"></param>
        /// <param name="arguments"></param>
        void Publish(string channel, params object[] arguments);
    }
}
